#include <repository/system/system_setting_repository.h>

using namespace model;

// CRUD Operations
insert_ret_type
SystemSettingRepository::create(const SystemSettingDTO& system_setting_dto)
{
  return _insert(system_setting_dto);
};

update_ret_type
SystemSettingRepository::updateByKey(const std::string& key,
                                     const SystemSettingDTO& dto)
{
  return _update(dto, db::system_setting{}.setting_key == key);
};

delete_ret_type SystemSettingRepository::removeByKey(const std::string& key)
{
  return _remove(db::system_setting{}.setting_key == key);
}

// Custom Queries
select_ret_type<SystemSettingDTO> SystemSettingRepository::getAll()
{
  return _getAll();
}

select_ret_type<SystemSettingDTO>
SystemSettingRepository::getByPage(int page_size, int offset)
{
  return _select_from_unconditionally(page_size, offset);
}

count_type SystemSettingRepository::count()
{
  return _count();
}

// 其他方法实现...
